<template>
    <div class="box">
        <h2>CustomInput 组件</h2>
        <div>展示父组件传过来的value: {{ value }}</div>
        <input
            type="text"
            :value="value"
            @input="$emit('input', $event.target.value)"
        >
        <!-- <button @click="$emit('input', value + 1)">加1</button> -->
    </div>
</template>

<script>
export default {
    name: 'CustomInput',
    props: ['value']
}
</script>
